Optimal. Leaf size=156 \[ \frac{(3 A+4 C) \sin ^3(c+d x)}{3 a d}-\frac{(3 A+4 C) \sin (c+d x)}{a d}-\frac{(A+C) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}+\frac{(4 A+5 C) \sin (c+d x) \cos ^3(c+d x)}{4 a d}+\frac{3 (4 A+5 C) \sin (c+d x) \cos (c+d x)}{8 a d}+\frac{3 x (4 A+5 C)}{8 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.191381, antiderivative size = 156, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.152, Rules used = {3042, 2748, 2633, 2635, 8} \[ \frac{(3 A+4 C) \sin ^3(c+d x)}{3 a d}-\frac{(3 A+4 C) \sin (c+d x)}{a d}-\frac{(A+C) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}+\frac{(4 A+5 C) \sin (c+d x) \cos ^3(c+d x)}{4 a d}+\frac{3 (4 A+5 C) \sin (c+d x) \cos (c+d x)}{8 a d}+\frac{3 x (4 A+5 C)}{8 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3042
Rule 2748
Rule 2633
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \frac{\cos ^3(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+a \cos (c+d x)} \, dx &=-\frac{(A+C) \cos ^4(c+d x) \sin (c+d x)}{d (a+a \cos (c+d x))}+\frac{\int \cos ^3(c+d x) (-a (3 A+4 C)+a (4 A+5 C) \cos (c+d x)) \, dx}{a^2}\\ &=-\frac{(A+C) \cos ^4(c+d x) \sin (c+d x)}{d (a+a \cos (c+d x))}-\frac{(3 A+4 C) \int \cos ^3(c+d x) \, dx}{a}+\frac{(4 A+5 C) \int \cos ^4(c+d x) \, dx}{a}\\ &=\frac{(4 A+5 C) \cos ^3(c+d x) \sin (c+d x)}{4 a d}-\frac{(A+C) \cos ^4(c+d x) \sin (c+d x)}{d (a+a \cos (c+d x))}+\frac{(3 (4 A+5 C)) \int \cos ^2(c+d x) \, dx}{4 a}+\frac{(3 A+4 C) \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{a d}\\ &=-\frac{(3 A+4 C) \sin (c+d x)}{a d}+\frac{3 (4 A+5 C) \cos (c+d x) \sin (c+d x)}{8 a d}+\frac{(4 A+5 C) \cos ^3(c+d x) \sin (c+d x)}{4 a d}-\frac{(A+C) \cos ^4(c+d x) \sin (c+d x)}{d (a+a \cos (c+d x))}+\frac{(3 A+4 C) \sin ^3(c+d x)}{3 a d}+\frac{(3 (4 A+5 C)) \int 1 \, dx}{8 a}\\ &=\frac{3 (4 A+5 C) x}{8 a}-\frac{(3 A+4 C) \sin (c+d x)}{a d}+\frac{3 (4 A+5 C) \cos (c+d x) \sin (c+d x)}{8 a d}+\frac{(4 A+5 C) \cos ^3(c+d x) \sin (c+d x)}{4 a d}-\frac{(A+C) \cos ^4(c+d x) \sin (c+d x)}{d (a+a \cos (c+d x))}+\frac{(3 A+4 C) \sin ^3(c+d x)}{3 a d}\\ \end{align*}
Mathematica [A] time = 0.530179, size = 283, normalized size = 1.81 \[ \frac{\sec \left (\frac{c}{2}\right ) \cos \left (\frac{1}{2} (c+d x)\right ) \left (72 d x (4 A+5 C) \cos \left (c+\frac{d x}{2}\right )-96 A \sin \left (c+\frac{d x}{2}\right )-72 A \sin \left (c+\frac{3 d x}{2}\right )-72 A \sin \left (2 c+\frac{3 d x}{2}\right )+24 A \sin \left (2 c+\frac{5 d x}{2}\right )+24 A \sin \left (3 c+\frac{5 d x}{2}\right )+72 d x (4 A+5 C) \cos \left (\frac{d x}{2}\right )-480 A \sin \left (\frac{d x}{2}\right )-168 C \sin \left (c+\frac{d x}{2}\right )-120 C \sin \left (c+\frac{3 d x}{2}\right )-120 C \sin \left (2 c+\frac{3 d x}{2}\right )+40 C \sin \left (2 c+\frac{5 d x}{2}\right )+40 C \sin \left (3 c+\frac{5 d x}{2}\right )-5 C \sin \left (3 c+\frac{7 d x}{2}\right )-5 C \sin \left (4 c+\frac{7 d x}{2}\right )+3 C \sin \left (4 c+\frac{9 d x}{2}\right )+3 C \sin \left (5 c+\frac{9 d x}{2}\right )-552 C \sin \left (\frac{d x}{2}\right )\right )}{192 a d (\cos (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.057, size = 352, normalized size = 2.3 \begin{align*} -{\frac{A}{ad}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{C}{ad}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-3\,{\frac{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{7}A}{ad \left ( \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) ^{4}}}-{\frac{25\,C}{4\,ad} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{7} \left ( \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-7\,{\frac{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{5}A}{ad \left ( \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) ^{4}}}-{\frac{115\,C}{12\,ad} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5} \left ( \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-5\,{\frac{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{3}A}{ad \left ( \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) ^{4}}}-{\frac{109\,C}{12\,ad} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3} \left ( \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-{\frac{A}{ad}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \left ( \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-{\frac{7\,C}{4\,ad}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \left ( \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}+3\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) A}{ad}}+{\frac{15\,C}{4\,ad}\arctan \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.53064, size = 474, normalized size = 3.04 \begin{align*} -\frac{C{\left (\frac{\frac{21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{109 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{115 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac{75 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a + \frac{4 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{6 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac{4 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac{a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac{45 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac{12 \, \sin \left (d x + c\right )}{a{\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + 12 \, A{\left (\frac{\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a + \frac{2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac{3 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac{\sin \left (d x + c\right )}{a{\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.46508, size = 290, normalized size = 1.86 \begin{align*} \frac{9 \,{\left (4 \, A + 5 \, C\right )} d x \cos \left (d x + c\right ) + 9 \,{\left (4 \, A + 5 \, C\right )} d x +{\left (6 \, C \cos \left (d x + c\right )^{4} - 2 \, C \cos \left (d x + c\right )^{3} +{\left (12 \, A + 13 \, C\right )} \cos \left (d x + c\right )^{2} -{\left (12 \, A + 19 \, C\right )} \cos \left (d x + c\right ) - 48 \, A - 64 \, C\right )} \sin \left (d x + c\right )}{24 \,{\left (a d \cos \left (d x + c\right ) + a d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 12.5831, size = 1795, normalized size = 11.51 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17939, size = 243, normalized size = 1.56 \begin{align*} \frac{\frac{9 \,{\left (d x + c\right )}{\left (4 \, A + 5 \, C\right )}}{a} - \frac{24 \,{\left (A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{a} - \frac{2 \,{\left (36 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 75 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 84 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 115 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 60 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 109 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 12 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 21 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{4} a}}{24 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]